#注册表单业务

from page.page_regForm import PageRegForm

class ServiceRegForm(object):
    def __init__(self,driver,base_url):
        self.driver=driver
        self.base_url=base_url

        self.page_regForm=PageRegForm(self.driver,self.base_url)


    def service_regForm_001(self,d):
        self.page_regForm.openUrl()
        self.page_regForm.input_zanhao(d["zanhao"])
        self.page_regForm.input_pwd(d["pwd"])
        self.page_regForm.input_sex(d["sex"])
        self.page_regForm.input_guoji(d["guoji"])
        self.page_regForm.input_aihao(d["aihao"])
        self.page_regForm.input_degree(d["degree"])
        self.page_regForm.input_jiesao(d["jiesao"])
        self.page_regForm.input_zaopian(d["zaopian"])
        self.page_regForm.input_birthday(d["birthday"])
        self.page_regForm.click_regButton()

        siji=self.page_regForm.getRegSuccessTips() #"注册成功"
        self.page_regForm.clickJsAcceptButton()
        yuqi=d["yuqi"]
        return yuqi in siji

